Watchdog Termination
A Watchdog Termination on iOS occurs when the operating system kills an app for violating certain rules regarding time or resource usage.
This can happen if:
- an app uses too much memory,
- consumes excessive CPU leading to device overheating,
- performs synchronous networking on the main thread,
- if the main thread is blocked for too long12.
In crash reports, these terminations are often identified by the termination reason code 0x8badf00d
, which humorously stands for "ate bad food".
If you’re developing an app and encountering these terminations, it’s crucial to ensure that your app’s main thread remains responsive and that resource-intensive tasks are handled appropriately in the background.